package com.sumainfor.pc.epc.controller.housekeeper;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.pc.epc.service.HoHousingAlterService;
import com.sumainfor.pc.epc.service.HoHousingPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/housekeeper/HoHousingPlan")
public class HoHousingPlanController implements Serializable{

    @Autowired
    private HoHousingPlanService hoHousingPlanService;

    /**
     *运营部服务管家根据房源配置主表编号查询房源配置变更
     */
    @GetMapping("/getHoHpList")
    public JsonResult getHoHpList(@RequestParam Map<String,Object>params) {
        return hoHousingPlanService.getHoHpList(params);
    }
    /**
     *运营部服务管家根据房源配置主表编号查询房源配置变更
     */
    @PostMapping("/updateHoHouInfoInId")
    public JsonResult updateHoHouInfoInId(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.updateHoHouInfoInId(params);
    }
    /**
     *市场部房源池的房源详情查询房源的各个房间的房间配置信息
     */
    @GetMapping("/key/getHoPlanAlterList")
    public JsonResult getHoPlanAlterList(@RequestParam Map<String,Object>params) {
        return hoHousingPlanService.getHoPlanAlterList(params);
    }
    /**
     *租客端协助开门查询房源的房间配置
     */
    @PostMapping("/key/getHoInteHouConInfoList")
    public JsonResult getHoInteHouConInfoList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoInteHouConInfoList(params);
    }
    /**
     *租客端协助开门查询房源的房间配置(运营助理发送临时密码)
     */
    @PostMapping("/getRdHoInteHouConInfoList")
    public JsonResult getRdHoInteHouConInfoList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoInteHouConInfoList(params);
    }
    /**
     *服务秘书审核首月水电押金账单的时候查询房源的智能设备编号列表
     */
    @PostMapping("/key/getHoSeInteConList")
    public JsonResult getHoSeInteConList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoSeInteConList(params);
    }
    /**
     *租客端申请临时密码 （只查询有智能设备的房间）
     */
    @PostMapping("/key/getHoRdHouList")
    public JsonResult getHoRdHouList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdHouList(params);
    }
    /**
     *租赁顾问签约的时候查询房源的配置列表 房间 or 房源
     */
    @PostMapping("/getHoRdHouConList")
    public JsonResult getHoRdHouConList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdHouConList(params);
    }
    /**
     *租赁顾问签约的时候查询房源的配置列表 公共区域
     */
    @PostMapping("/getHoRdHouConListPublic")
    public JsonResult getHoRdHouConListPublic(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdHouConListPublic(params);
    }
    /**
     *市场部服务中心经理定价的房间列表
     */
    @PostMapping("/key/getHoRdHpiList")
    public JsonResult getHoRdHpiList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdHpiList(params);
    }
    /**
     *市场部签合同的时候查询房间智能电表的设备编号
     */
    @PostMapping("/getHoRdInteHpiList")
    public JsonResult getHoRdInteHpiList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdInteHpiList(params);
    }

    /**
     * 查询房源智能门锁的设备编号
     * @param params
     * @return
     */
    @PostMapping("/getHouRdRoomList")
    public JsonResult getHouRdRoomList(@RequestBody Map<String,Object> params){
        return hoHousingPlanService.getHouRdRoomList(params);
    }




    /**
     *租客端 充值智能设备 查询房源的房间配置列表信息
     */
    @PostMapping("/key/getHoRdInteDeviceHouList")
    public JsonResult getHoRdInteDeviceHouList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdInteDeviceHouList(params);
    }
    /**
     *退租的时候查询房源的房间智能电表信息列表
     */
    @PostMapping("/getHoRdInteDeviceList")
    public JsonResult getHoRdInteDeviceList(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdInteDeviceList(params);
    }
    /**
     *租赁顾问点击确认到达的时候查询房源的智能门锁编号信息
     */
    @PostMapping("/key/getHoRdWorder")
    public JsonResult getHoRdWorder(@RequestBody Map<String,Object>params) {
        return hoHousingPlanService.getHoRdWorder(params);
    }
}
